<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<jsp:include page="../common/header.jsp"></jsp:include>
<link rel="stylesheet" href="css/data.css">
<html>
<head>
<title>时钟特效</title>
<script type="text/javascript"> 
function disptime(){
	var d = new Date();  
 /*设置div的内容为当前时间*/
 document.getElementById("myclock").innerHTML=d.getFullYear() + "年" +(d.getMonth() + 1) + "月" + d.getDate() + "日"+" "+d.getHours()+":"+d.getMinutes()+":"+d.getSeconds();
/*
  使用setTimeout在函数disptime()体内再次调用setTimeout
  设置定时器每隔1秒（1000毫秒），调用函数disptime()执行，刷新时钟显示
*/
  var myTime=setTimeout("disptime()",1000);
}
 
</script>
</head>
 
<body onload="disptime()">
<div id="myclock"></div>
</body>
</html>